package de.fuberlin.inf.alp2;

import java.util.List;

public interface Polygon {
	static int a = 4;
	
	public List<Point> getPoints();
	/** Adds a new point next to the last created point.
	 * @param The point to add.
	 * @return
	 */
	boolean addPoint(Point p) throws Exception;
	/** 
	 * @return Perimeter of the polygon
	 */
	double perimeter() throws Exception;
	/** 
	 * @return The centroid of the polygon.
	 */
	Point center() throws Exception;
	/** Moves the polygon
	 * @param dx vertical offset
	 * @param dy horizontal offset
	 */
	void shift(int dx, int dy) throws Exception;
	/** Checks, whether the polygon has more than two points, which are not
	 * located at one line.
	 * @return True, if figure is a polygon, otherwise false
	 */
	boolean isPolygon();
}
